package me.zhanshi123.advancedcleaner.command.sub;

import me.zhanshi123.advancedcleaner.Main;
import me.zhanshi123.advancedcleaner.command.SubCommand;
import me.zhanshi123.advancedcleaner.command.type.AdminCommand;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;

public class ReloadCommand extends SubCommand implements AdminCommand {
    public ReloadCommand() {
        super("reload", "/ac reload", "Reload the plugin");
    }

    @Override
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
        Main.getInstance().onDisable();
        Main.getInstance().onEnable();
        sender.sendMessage("§7Done");
        return true;
    }
}
